/*
 * SaleBO.java
 *
 * Created on March 22, 2007, 6:38 PM
 */

package Data;

import java.util.Date;

/**
 *
 * @author Danny Beutler
 */
public class SaleBO extends RevenueSourceBO {
    private String id;
    private int quantity;
    private ProductBO product;
    
    
    /** Creates a new instance of SaleBO */
    public SaleBO(String id) {
        this.id = id;
    }
    
    public String getId() {
        return id;
    }
    
    public int getQuantity() {
        return quantity;
    }
    
    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
    
    public ProductBO getProduct() {
        return product;
    }
    
    public void setProduct(ProductBO product) {
        this.product = product;
    }
    
    public void calculatePrice() {
        double price = this.getProduct().getPrice() * quantity;
        super.setPrice(price);
    }
}
